gboolean ret = FALSE;
gboolean from_cache = FALSE;
const char *url_override = NULL;
+ g_autoptr(GVariant) extra_headers = NULL;
g_autoptr(GPtrArray) mirrorlist = NULL;
if (options)
- (void) g_variant_lookup (options, "override-url", "&s", &url_override);
+ {
+ (void) g_variant_lookup (options, "override-url", "&s", &url_override);
+ (void) g_variant_lookup (options, "http-headers", "@a(ss)", &extra_headers);
+ }
mainctx = g_main_context_new ();
g_main_context_push_thread_default (mainctx);
if (fetcher == NULL)
goto out;
+ if (extra_headers)
+ _ostree_fetcher_set_extra_headers (fetcher, extra_headers);
+
{
g_autofree char *url_string = NULL;
if (metalink_url_string)
* The following are currently defined:
*
* - override-url (s): Fetch summary from this URL if remote specifies no metalink in options
+ * - http-headers (a(ss)): Additional headers to add to all HTTP requests
*
* Returns: %TRUE on success, %FALSE on failure
*/